#Use datatable to show the first 100 cases
library(tidyverse)
library("lubridate")
clean_total <- clean_total %>%
mutate(Date = as.Date(Date.Rptd, "%m/%d/%Y %H:%M:%S")) %>%
mutate(Location = str_squish(LOCATION))
names(clean_total)[names(clean_total) == 'Crm.Cd.Desc'] <- "Category"
clean_total$Year <- format(clean_total$Date, format="%Y")
To visualize the data, we created an interactive map using the booklet to help us visualize the distribution of crime incidents in Los Angeles. The map contains 43,831 total crime data. The pop-up provides information on the category, date, address, victim’s age, victim’s gender, longitude and latitude. The purpose of this interactive map is to help us display more detailed information based on location.